home *** CD-ROM | disk | FTP | other *** search
/ Agent Central Host Computer / Agent - Central Host Computer.iso / _SETUP.1 / ocukeys.sql < prev    next >
Text File  |  2000-05-12  |  2KB  |  42 lines

  1. /* RCSVER $Id: ocukeys.sql,v 1.8 2000-03-22 15:35:39-06 randy Exp $ */
  2. /* *************************************************************************
  3. *        Copyright (C) 1998, Agent Systems, Inc. All Rights Reserved.
  4. *
  5. * Name:        ocukeys.sql 
  6. * Date:        01/18/1999
  7. * memo:        Randy Wood
  8. * Description:    Create the ocukeys table. This table defines all commands
  9. *        associated with the OCU keys.
  10. * Changes:
  11. ************************************************************************* */
  12. CREATE TABLE ocukeys
  13. (
  14.         modifier    VARCHAR2(1),    /* Modifier key, or 'Q' if none */
  15.         key        VARCHAR2(1),    /* Key to which command is linked */
  16.         descr        VARCHAR2(20),    /* Description of command */
  17.         action_code    VARCHAR2(1),    /* Action to take: */
  18.                         /*  C: command   */
  19.                         /*  F: fare      */
  20.                         /*  S: fareset   */
  21.                         /*  T: set trip  */
  22.                         /*  D: inactive  */
  23.                     /*  L: tally command */
  24.         command_id    NUMBER(38),    /* particular command ('C') */
  25.         fare_id        NUMBER(38),    /* fare, if action_code = 'F' */
  26.         fareset_id    NUMBER(38),     /* fareset, if action_code = 'S' */
  27.         trip_id        NUMBER(1),     /* 1=next trip, 2=prev trip  'T' */
  28.         sec_level    NUMBER(38),    /* security level of this function */
  29.         /* Can't have a zero reference, so for now these are removed */
  30.         /*
  31.         CONSTRAINT fk1_ocukeys FOREIGN KEY (command_id, config_num) REFERENCES
  32.                         ocucmnd(id, config_num) ON DELETE CASCADE,
  33.         CONSTRAINT fk3_ocukeys FOREIGN KEY (fareset_id, config_num) REFERENCES
  34.                         faresets(id, config_num) ON DELETE CASCADE,
  35.         */
  36.     config_num    NUMBER(38)
  37.         CONSTRAINT ref_ocukeys4 REFERENCES configset(num)
  38.         ON DELETE CASCADE,
  39.     tally_id    NUMBER(38),    /* Tally group */
  40.     CONSTRAINT pk_ocukeys PRIMARY KEY (modifier, key, config_num)
  41. );
  42.